<template>
  <view class="url">
    <text @click="pdf">{{pdfUrl}}</text>
  </view>
</template>

<script>
export default {
  data() {
    return {
      pdfUrl: ""
    };
  },
  methods: {
    pdf() {
      uni.setClipboardData({
        data: this.pdfUrl,
        success: function() {
          uni.showToast({
            title: "复制成功",
            duration: 2000
          });
        }
      });
    }
  },
  onLoad(options) {
    this.pdfUrl = options.pdfUrl;
  }
};
</script>

<style>
page {
  background: white;
}
.url {
  padding: 20rpx;

  padding-top: 300rpx;
}
</style>
